#include "sharepostermgr.h"
#include "minutelisten.h"


SharePosterMgr::SharePosterMgr()
{
    int tick_check = m_mgr.Expire() / 60;
    MinuteListen::Instance()->Register(__FUNCTION__, [this, tick_check](std::int64_t tick){
        if (0 != (tick % tick_check)) return;
        this->m_mgr.OnTick();
    });
}

const agency_event_api::SharePoster* SharePosterMgr::Get(const std::uint32_t uid)
{
    return m_mgr.Get(uid);
}

void SharePosterMgr::Set(const std::uint32_t uid, agency_event_api::SharePoster&& share_poster)
{
    m_mgr.Set(uid, std::move(share_poster));
}


























